package com.woniuxy.system.common.enums.impl;

import com.woniuxy.system.common.enums.IResultCode;
import lombok.Getter;

/**
 * 封装业务状态码
 */
@Getter
public enum BusinessCode implements IResultCode {
    // 枚举对象：描述状态码、状态码的描述
    VERRIFY_CODE_IS_NULL(21000,"验证码为空"),
    VERRIFY_CODE_ERROR(21001,"验证码错误"),
    LOGIN_FAILED(21002,"用户名或密码错误，登录失败"),
    USER_EXISTS(21003,"账户已经存在，注册失败！"),
    EMAIL_EXISTS(21004,"邮箱已存在,注册失败！"),
    STORAGE_IS_NOT_ENOUGH(21005,"库存不足！"),
    ORDER_REPEAT_SUBMIT(21006,"订单已提交过，请勿重复提交！");


    private int code;
    private String message;

    // 枚举构造函数，默认是private
    BusinessCode(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
